package com.hzqx.syndata.threadpool;

public class MultiTable {
    public static void main(String args[]) {
        //m(9);
        test(9);
        //ThreadLocal threadLocal = new ThreadLocal();
    }

    /**
     * 打印出九九乘法表
     * @param i
     */
    public static void m(int i) {
        System.out.println("----");
        if (i == 1) {
            System.out.println("1*1=1 ");
        } else {
            System.out.println("+++++");
            m(i - 1);
            for (int j = 1; j <= i; j++) {
                System.out.print(j + "*" + i + "=" + j * i + " ");
            }
            System.out.println();
        }
    }

    public static void test(int i){
        if(i==10){
            System.out.println("1*1=1");
        }else{
            test(i-1);
            for (int j = 1; j <= i; j++) {
                System.out.print(j + "*" + i + "=" + j * i + " ");
            }
            System.out.println();
        }
    }
}
